package com.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import com.dao.*;
import com.entity.*;
@Service
public class UserService {
	@Resource
	private UserDao dao;
	
	public int saveUser(User user){
		return dao.save(user);
	}
	
	public User checkLogin(String email,String password){
		return dao.getUser(email, password);
	}
	
	public boolean checkEmail(String email){
		return dao.getUser(email);
	}
	
	public User getUserById(int id){
		return dao.getUser(id);
	}
}
